package uba.ing2.subite.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {
	public static boolean equalsWithoutTime(Date a, Date b) {
		Calendar thisDate = Calendar.getInstance();
		thisDate.setTime(a);
		
		Calendar otherDate = Calendar.getInstance();
		otherDate.setTime(b);
		
		return thisDate.get(Calendar.DAY_OF_MONTH) == otherDate.get(Calendar.DAY_OF_MONTH) 
			&& thisDate.get(Calendar.MONTH) == otherDate.get(Calendar.MONTH)
			&& thisDate.get(Calendar.YEAR) == otherDate.get(Calendar.YEAR);
	}

	private DateUtil() {}
}
